// JORGE FERNANDO GOMEZ
// 1259371
// 189631
// LEC A1
// MARTIN MÜLLER
// D02
// YANG LIU


#ifndef READ_H
#define READ_H 1

/* Maximum line length (including newline). */
#define MAXLEN 256

#include <string.h>     /* Included to make memwatch happy. */
#include "memwatch.h"

#include "util.h"

/* Struct to store lines from an input file
 * and each line's type. */
typedef struct {

    char lineString[MAXLEN+1];

    int commandType;

    enum { FIGURE, DRAW, END, PRINTFIGURE,
           DRAWFIGURE, TRANSLATE, CHILD,
           COMMENT, BLANK, ROTATE
    } enumKeywords;

} Line;


extern int inputFileLength;


/* FUNCTION PROTOTYPES. */

Line* initLines ( int size );

Line* getLines ( void );

/* Reads inputFile stream and stores lines sequentially in Lines. */
int readFile ( Line * Lines, FILE * inputFile );

#endif /* end of include guard: READ_H */
